#include    <stdio.h>
/*int main(){
    int sk[4]={1,2,3,4};
    int * p_sk=sk;

    printf("%p\n,%p\n,%p\n",p_sk,sk,&sk[0]);
      printf("%p\n,%p\n,%p\n",p_sk+1,sk+1,&sk[1]);
  printf("%d\n,%d\n,%d\n",* p_sk,* sk,sk[0]);

    printf("%d\n,%d\n,%d\n",* (p_sk+1),* (sk+1),sk[1]);
}
int main(){
    int sd[5]={1,2,3,4,5};
    int *p_sd=sd;
    for (int i=0; i<5;i++ ) {
        printf("%d",*(p_sd+i));
    }
    printf("\n");
    for (int j=0; j<5;j++ ) {
        printf("%d",*(sd+j));
    } printf("\n");
    for (int m=0; m<5;m++ ) {
        printf("%d",sd[m]);
    }
    
    printf("%d",*(p_sd++));

}*/


int main(){
    int score[6];
    int *ps=score;
    printf("请输入5门课的成绩\n");
    for(int i=0;i<6;i++){
        printf("请输入第%d门课的成绩",i+1);
      //  scanf("%d",&score[i]);
        scanf("%d",&*(ps+i));
    }
    printf("排序前的成绩为:");
    for(int i=0;i<6;i++){
        //printf("%  d",score[i]);
        printf("%  d",*(ps+i));
}
    printf("\n");
    for (int i=0; i<6; i++) {
        for(int j=0;j<6-i;j++){
            //if(score[j]<score[j+1]){
            if(*(ps+j)<*(ps+j+1)){
            int s=0;
              //  s=score[j];
                s=*(ps+j);
                //score[j]=score[j+1];
                *(ps+j)=*(ps+j+1);
              //  score[j+1]=s;
                *(ps+j+1)=s;
            }
         
         }
    }
    printf("排序后的成绩为:");
    for(int i=0;i<6;i++){
        //printf("%d",score[i])
        printf("%  d",*(ps+i));
    
    }
}